from django.db import models


class Host(models.Model):
    """
    主机表
    """

    # 主机名
    name = models.CharField(max_length=64, unique=True)

    # 主机IP
    ip = models.GenericIPAddressField(unique=True)

    # 端口
    port = models.SmallIntegerField()

    # idc
    idc = models.CharField(max_length=64)

    def __str__(self):
        return self.name
